#!usr/bin/env python
# -*- coding:utf-8 _*-
"""
@author:zhengxin
@file: urls.py
@time: 2022/12/15  14:21
# @describe:
"""
from django.urls import path
from photo.views import home, upload, oss_home, fetch_photos
from django.views.generic import TemplateView

# APP名称-用于Django幕后的url查询
app_name = 'photo'

# url列表
urlpatterns = [
    # path() 接收三个参数，分别是：路径-空字符串表示没有下一级的路径了; 视图函数; 路径名。
    path('', home, name='home'),
    path('upload/', upload, name='upload'),
    # 阿里云oss
    path('oss-home/', oss_home, name='oss_home'),
    # 无限滚动
    path('endless-home/', TemplateView.as_view(template_name='photo/endless_list.html'), name='endless_home'),
    path('fetch/', fetch_photos, name='fetch'),
]